package com.wcr.day03.Test6;

public class Test {
    public static void main(String[] args) {

        /*成员变量: 编译看左边 (父类), 运行看左边 (父类)

        成员方法: 编译看左边 (父类), 运行看右边 (子类)*/
        Animal a = new Cat();
        Cat c = new Cat();
        System.out.println(a.num);
        a.method();
        c.method();
        System.out.println(c.num);


    }

}
